
#include "../mpmdComm.hpp"
#include "mpi.h"
#include <cassert>
#include <iostream>
#include <vector>
using namespace std;
using namespace EXTREAM;
int main(int argc, char **argv) {

  int my_rank, num_proc;
  MPI_Init(&argc, &argv);

  MpmdComm::getObjPtr()->init(MPI_COMM_WORLD);

  const int local_comm_size = MpmdComm::getObjPtr()->localCommSize();
  const int remote_comm_size = MpmdComm::getObjPtr()->remoteCommSize();
  const int local_rank = MpmdComm::getObjPtr()->rankInLocal();

  MPI_Request req;
  // 只发送不接收
  MPI_Isend(&local_rank, 1, MPI_INT, 1, 1, MpmdComm::getObjPtr()->interComm(),
            &req);

  MPI_Status stas;
  MPI_Wait(&req, &stas);

  MPI_Finalize();
  return 0;
}